package com.hyk.learning.test.server.com.hyk.learning.serviceimpl;

import com.hyk.learning.annotation.RpcService;
import com.hyk.learning.test.helloApi.Hello;
import com.hyk.learning.test.helloApi.HelloService;
import lombok.extern.slf4j.Slf4j;

/**
 * @className: HelloServiceImpl2
 * @author: hyk199710
 * @description: TODO
 * @date: 2024/5/25 17:23
 */
@Slf4j
//@RpcService(group = "test2", version = "version2")
public class HelloServiceImpl2 implements HelloService {

    static {
        System.out.println("HelloServiceImpl2被创建");
    }

    @Override
    public String hello(Hello hello) {
        log.info("HelloServiceImpl2收到: {}.", hello.getMessage());
        String result = "Hello description is " + hello.getDescription();
        log.info("HelloServiceImpl2返回: {}.", result);
        return result;
    }
}
